package com.supermap.tool;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * @author xiaolu
 * @date 2018/6/21 下午6:38
 */
public class ThirdPortUrlTool {
    public static String getThridLoginUrl(String loginName, String password) {
        StringBuilder url = new StringBuilder("http://10.230.124.132/wangmarket/loginSubmit.do?");
//        userName=13905437251&password=123456
//        http://10.230.124.132/wangmarket/loginSubmit.do?username=admin&password=admin&cross=true
        try {
            url.append("userName=").append(URLEncoder.encode(loginName,"UTF-8")).append("&");
            url.append("password=").append(URLEncoder.encode(password,"UTF-8")).append("&cross=true");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return url.toString();
    }
}
